Skip to content

Add reproducer test for IGC miscompilation of aligned struct byval args#1185

Draft
pvelesko wants to merge 1 commit intomainfrom
fix-fluidSim
Draft

Add reproducer test for IGC miscompilation of aligned struct byval args#1185
pvelesko wants to merge 1 commit intomainfrom
fix-fluidSim

Conversation

@pvelesko
Copy link
Collaborator

@pvelesko pvelesko commented Mar 9, 2026

Summary

  • Relates to HeCBench fluidSim: kernel produces incorrect results #1180: HeCBench fluidSim fails due to IGC codegen bug, not a chipStar bug
  • Adds minimal reproducer test TestHeCBenchFluidSim.hip that demonstrates the issue
  • The bug: when __align__(64) structs are passed by value to a kernel and their fields are loaded into double4 via make_double4() and used in arithmetic with other byval double4 parameters, IGC miscompiles — fields s4-s7 get the values of s0-s3
  • chipStar generates correct LLVM IR (byval(%struct.double8) align 64); the issue is in IGC's backend

Test plan

…val args (#1180)

Minimal test that demonstrates IGC codegen bug: when __align__(64)
structs are passed by value to a kernel and their fields are loaded
into double4 vectors via make_double4() and used in arithmetic with
other byval double4 parameters, fields s4-s7 incorrectly read the
values of s0-s3. This is an upstream IGC bug (chipStar generates
correct LLVM IR with byval align 64).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant